package org.forever.webosgi.action;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.forever.webosgi.Activator;
import org.forever.webosgi.user.service.Validator;

public class LoginAction extends HttpServlet{
	private static final long serialVersionUID = 605084525972358889L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		Validator validator = Activator.getService(Validator.class);
		try {
			validator.validate("admin", "admin");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
